﻿<Application x:Class="GrooveSharp.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             DispatcherUnhandledException="Application_DispatcherUnhandledException"
             
             
             >
    
    <Application.Resources>
        
        
        <Style TargetType="{x:Type UserControl}">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background" Value="Black" />
        </Style>
        
        <Style TargetType="{x:Type CheckBox}">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background" Value="Black" />
            <Setter Property="Margin" Value="3" />
        </Style>

        <Style TargetType="{x:Type RadioButton}">
            <Setter Property="Background" Value="Black"/>
            <Setter Property="Foreground" Value="White"/>
        </Style>

        <!-- from http://www.c-sharpcorner.com/UploadFile/mahesh/WPFTreeView08202008231544PM/WPFTreeView.aspx -->
        <Style TargetType="{x:Type TreeView}">
            <!-- Original intention: make it black. Then arrows are hardly visible. Modifying them is tedious. Switched to Gold and it looks surprisingly 
                http://msdn.microsoft.com/en-us/library/ms752048.aspx
            -->
            <Setter Property="Background" Value="Gold" />
        </Style>
        
        <Style TargetType="{x:Type TreeViewItem}">
            <Setter Property="Background" Value="Gold"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="VerticalContentAlignment" Value="Bottom"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
        </Style>
        



        <Style TargetType="{x:Type GroupBox}">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="BorderBrush" Value="LightGray" />
            <Setter Property="BorderThickness" Value="0.5" />
            <Setter Property="Margin" Value="3" />
            <Setter Property="Padding" Value="5" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Top" />
        </Style>

        <Style TargetType="{x:Type ListView}">
            <Setter Property="Background" Value="Black" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Margin" Value="3" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible" />

            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Black"/>
            </Style.Resources>

        </Style>

        <Style TargetType="{x:Type RichTextBox}">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background" Value="Black" />
            <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
        </Style>

        <Style x:Key="GrooveSharpListViewItem" TargetType="{x:Type ListViewItem}">
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="White" />
                    <Setter Property="Foreground" Value="Black" />
                    <Setter Property="BorderBrush" Value="{x:Null}" />
                </Trigger>

                <MultiTrigger>
                    <MultiTrigger.Conditions>
                        <Condition Property="IsSelected" Value="False" />
                        <Condition Property="IsMouseOver" Value="True" />
                    </MultiTrigger.Conditions>
                    <MultiTrigger.Setters>
                        <Setter Property="Background" Value="Black" />
                        <Setter Property="Foreground" Value="White" />
                        <Setter Property="BorderBrush" Value="Gold" />
                    </MultiTrigger.Setters>
                </MultiTrigger>
            </Style.Triggers>
        </Style>

        <!--
        http://msdn.microsoft.com/en-us/library/ms744790.aspx
        http://msdn.microsoft.com/en-us/library/bb613567.aspx
        -->
        <Style x:Key="CheckListBoxFocus">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle StrokeThickness="1" Stroke="White" StrokeDashArray="3 2" SnapsToDevicePixels="true" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Application.Resources>
</Application>
